package com.example.port.service;

import com.example.port.entity.Invoice;
import com.example.port.entity.StorageFee;

import java.util.List;

public interface InvoiceService {
    
    int insertInvoice(Invoice invoice);
    
    List<Invoice> getAllInvoices();
    
    // 根据仓储费用自动生成发票
    int generateInvoiceFromStorageFees(List<Long> storageFeeIds, Integer clientId);
    
    // 获取单个发票详细信息
    Invoice getInvoiceById(Long invoiceId);
    
    // 获取发票关联的费用
    List<StorageFee> getInvoiceFees(Long invoiceId);
    
    // 开具发票
    int issueInvoice(Long invoiceId);
    
    // 删除发票
    int deleteInvoice(Long invoiceId);
    
    // 解除费用与发票的关联
    int unlinkFeeFromInvoice(Long feeId);
} 
